package com.diandi.signature.enums.platfrom;

/**
 * Created by mxp on 2017/8/31.
 */
public enum PkgMsgStatus {
    成功(1,"成功"),
    正在处理中(2,"正在处理中"),
    处理失败(3,"处理失败"),
    ;
    private int status;
    private String desc;

    PkgMsgStatus(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static PkgMsgStatus getEmun(int status){
        for (PkgMsgStatus pkgMsgStatus : PkgMsgStatus.values()) {
            if(pkgMsgStatus.getStatus() == status){
                return pkgMsgStatus;
            }
        }
        return null;
    }
}
